package cn.cloudplug.instar_ec.main.login;

import android.os.Bundle;
import android.support.v7.widget.AppCompatEditText;
import android.view.View;

import cn.cloudplug.instar_ec.R;
import cn.cloudplug.instar_ec.main.base.BackDelegate;

/**
 * Created by pc on 2018/1/22.
 */

public class PassphrasesDelegate extends BackDelegate {
    private static final String TITLE = "密码修改";
    //@BindView(R2.id.edt_pwd)
    AppCompatEditText edt_pwd;

    //@BindView(R2.id.edt_new_pwd)
    AppCompatEditText edt_new_pwd;

    //@BindView(R2.id.edt_again)
    AppCompatEditText edt_again;

    //@OnClick(R2.id.btn_login)
    void clickSendCode() {
    }

    private boolean checkForm(String phone, String code, String pwd, String again) {

        boolean isPass = true;

        if (phone == null || "".equals(phone)) {
            isPass = false;
        }

        if (code == null || "".equals(code)) {
            isPass = false;

        }

        if (pwd == null || "".equals(pwd) || pwd.length() < 6) {
            isPass = false;

        }

        if (again == null || !again.equals(pwd)) {
            isPass = false;

        }

        return isPass;
    }

    @Override
    protected Object setContent() {
        return R.layout.delegate_passphrases;
    }

    @Override
    protected void onBindView(Bundle savedInstanceState, View view) {
        setTitle(TITLE);
    }
}
